﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SiteRequireLogin.Master" AutoEventWireup="true" CodeBehind="InGiaThuoc.aspx.cs" Inherits="TranTekBE.InGiaThuoc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="BodyContent" runat="server">
    <asp:UpdatePanel ID="UpdatePanel" runat="server">
            <ContentTemplate>
        <div style="padding:20px;position: fixed;margin-top: 45px;">
        <div style="float:left">
            <input type="button" value="Print" onclick="javascript: printDiv('printablediv')" style=""/>
            
            </Br>
            <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click"/>
            </Br>
            <asp:DropDownList ID="droplist_Gia" runat="server">
                <asp:ListItem Selected="True" Value="1" Text="Giá 1"></asp:ListItem>
                <asp:ListItem Selected="False" Value="2" Text="Giá 2"></asp:ListItem>
                <asp:ListItem Selected="False" Value="3" Text="Giá 3"></asp:ListItem>
            </asp:DropDownList>
            <asp:TextBox autofocus="" ID="txtMaCode" runat="server" Height="243px" Width="200px" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" style="margin-left: 15px;margin-top: -54px;"></asp:TextBox>
            <asp:Literal ID="ltlError" runat="server"></asp:Literal>
        </div>
       
        <div id="printablediv" style="margin-top: 4px;border: 1px solid #000;float: left;height: auto;padding: 10px;margin-left: 330px;position: absolute;">
            <table>
                <tr>
                    <td>
                        <asp:Literal runat="server" ID="ltlDivDynamic1"></asp:Literal><!--Gọi Div Code-->
                    </td>
                </tr>
            </table>
        </div>
        </div>
         <script language="javascript" type="text/javascript">
             function LoadJS() {
             }
             function printDiv(divID) {
                 //Get the HTML of div
                 var divElements = document.getElementById(divID).innerHTML;
                 //Get the HTML of whole page
                 var oldPage = document.body.innerHTML;

                 //Reset the page's HTML with div's HTML only
                 document.body.innerHTML =
                   "<html><head><title></title></head><body>" +
                   divElements + "</body>";

                 //Print Page
                 window.print();

                 //Restore orignal HTML
                 document.body.innerHTML = oldPage;


             }
        </script>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
